<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>CSI udp to server: /home/shuspieler/Atheros-CSI-Tool-UserSpace-APP/recvCSI-with-socket/csi_fun.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">CSI udp to server
   &#160;<span id="projectnumber">v1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.8 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">/home/shuspieler/Atheros-CSI-Tool-UserSpace-APP/recvCSI-with-socket/csi_fun.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="csi__fun_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor">#include &lt;stdbool.h&gt;</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#define Kernel_CSI_ST_LEN 23 </span></div>
<div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="structCOMPLEX.html">   20</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;{</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;    <span class="keywordtype">int</span> real;</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;    <span class="keywordtype">int</span> imag;</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;}<a class="code" href="structCOMPLEX.html">COMPLEX</a>;</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div>
<div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="structcsi__struct.html">   26</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;{</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    u_int64_t tstamp;         <span class="comment">/* h/w assigned time stamp */</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;    </div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;    u_int16_t channel;        <span class="comment">/* wireless channel (represented in Hz)*/</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;    u_int8_t  chanBW;         <span class="comment">/* channel bandwidth (0-&gt;20MHz,1-&gt;40MHz)*/</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    u_int8_t  rate;           <span class="comment">/* transmission rate*/</span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    u_int8_t  nr;             <span class="comment">/* number of receiving antenna*/</span></div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    u_int8_t  nc;             <span class="comment">/* number of transmitting antenna*/</span></div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    u_int8_t  num_tones;      <span class="comment">/* number of tones (subcarriers) */</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    u_int8_t  noise;          <span class="comment">/* noise floor (to be updated)*/</span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    u_int8_t  phyerr;          <span class="comment">/* phy error code (set to 0 if correct)*/</span></div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    u_int8_t    rssi;         <span class="comment">/*  rx frame RSSI */</span></div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    u_int8_t    rssi_0;       <span class="comment">/*  rx frame RSSI [ctl, chain 0] */</span></div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    u_int8_t    rssi_1;       <span class="comment">/*  rx frame RSSI [ctl, chain 1] */</span></div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    u_int8_t    rssi_2;       <span class="comment">/*  rx frame RSSI [ctl, chain 2] */</span></div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    u_int16_t   payload_len;  <span class="comment">/*  payload length (bytes) */</span></div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    u_int16_t   csi_len;      <span class="comment">/*  csi data length (bytes) */</span></div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    u_int16_t   buf_len;      <span class="comment">/*  data length in buffer */</span></div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;}<a class="code" href="structcsi__struct.html">csi_struct</a>;</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="keywordtype">bool</span>  is_big_endian();</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="keywordtype">int</span>   open_csi_device();</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="keywordtype">void</span>  close_csi_device(<span class="keywordtype">int</span> fd);</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;<span class="keywordtype">int</span>   read_csi_buf(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* buf_addr,<span class="keywordtype">int</span> fd, <span class="keywordtype">int</span> BUFSIZE);</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<span class="keywordtype">void</span>  record_status(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* buf_addr, <span class="keywordtype">int</span> cnt, <a class="code" href="structcsi__struct.html">csi_struct</a>* csi_status);</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="keywordtype">void</span>  record_csi_payload(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* buf_addr, <a class="code" href="structcsi__struct.html">csi_struct</a>* csi_status,<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* data_buf, <a class="code" href="structCOMPLEX.html">COMPLEX</a>(* csi_buf)[3][114]);</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<span class="keywordtype">void</span>  porcess_csi(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* data_buf, <a class="code" href="structcsi__struct.html">csi_struct</a>* csi_status,<a class="code" href="structCOMPLEX.html">COMPLEX</a>(* csi_buf)[3][114]);</div>
<div class="ttc" id="structcsi__struct_html"><div class="ttname"><a href="structcsi__struct.html">csi_struct</a></div><div class="ttdef"><b>Definition:</b> csi_fun.h:26</div></div>
<div class="ttc" id="structCOMPLEX_html"><div class="ttname"><a href="structCOMPLEX.html">COMPLEX</a></div><div class="ttdef"><b>Definition:</b> csi_fun.h:20</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Jun 28 2017 07:03:56 for CSI udp to server by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.8
</small></address>
</body>
</html>
